package  
{
	import com.photonstorm.flixel.*;
	import org.flixel.*;

	public class GameOverState extends FlxState
	{
		private var stars:FlxStarField;
		private var gameOver:FlxText;
		private var playAgain:FlxButtonPlus;
		
		public function GameOverState() 
		{
			super();
		}
		
		override public function create():void
		{
			super.create();
			
			stars = new FlxStarField(0, 0, FlxG.width, FlxG.height, 100, 2, 30);
			
			gameOver = new FlxText(0, 48, 320, "GAME OVER");
			gameOver.alignment = "center";
			gameOver.size = 60;
			gameOver.alpha = 0.7;
			gameOver.color = 0xFF0080;
			
			playAgain = new FlxButtonPlus(0, 208, startGame, null, "Start");
			playAgain.screenCenter();
			
			add(stars);
			add(gameOver);
			add(playAgain);
			
			FlxG.mouse.show();
			
			add(Registry.hud);
		}
		
		private function startGame():void
		{
			FlxG.mouse.hide();
			
			FlxG.state = new PlayState;
		}
		
	}

}